//
//  NCFilterTableViewCell.swift
//  FilterBox
//
//  Created by 张文晏 on 2018/11/7.
//  Copyright © 2018 张文晏. All rights reserved.
//

import UIKit

class NCFilterTableViewCell: UITableViewCell {

    @IBOutlet weak var lbTitle: UILabel!
    @IBOutlet weak var iconSelect: UIImageView!
    
    var beSelected = false {
        didSet {
            iconSelect.isHighlighted = beSelected
            lbTitle.textColor = beSelected ? UIColor(hex: 0x006fff) : .black
        }
    }
    
    var title: String = "" {
        didSet {
            lbTitle.text = title
        }
    }
    
    
    var isMultiSelection = false {
        didSet {
            if isMultiSelection {
                iconSelect.image = NCUIBundle.image("ui_filter_multi_unselect")
                iconSelect.highlightedImage = NCUIBundle.image("ui_filter_multi_selected")
            } else {
                iconSelect.image = nil
                iconSelect.highlightedImage = NCUIBundle.image("ui_filter_single_selected")
            }
        }
    }
}
